A video coding device (coding device) which generates coded data by coding video images in order to transmit or record video images efficiently, and a video decoding device (decoding device) which generates decoded images by decoding the coded data are being used. Specific examples of video coding methods are a method defined in H.264/MPEG-4. AVC, a method used in KTA software, which is a joint development codec in VCEG (Video Coding Expert Group), a method used in TMuC (Test Model under Consideration) software, which is a successor codec to the codec used in KTA software, and a method used in HM (HEVC TestModel) software.
In such coding methods, images (pictures) forming video images are managed in a hierarchical structure which is constituted by slices obtained by dividing an image, largest coding units (LCU: Largest Coding Unit, also called a tree block) obtained by dividing a slice, coding units (CU: Coding Unit, also called a coding node) obtained by dividing a largest coding unit, and blocks and partitions obtained by dividing a coding unit. In many cases, images are coded by using blocks as the smallest coding unit.
Additionally, in such coding methods, normally, a prediction image is generated on the basis of a locally decoded image obtained by coding and decoding an input image, and difference data indicating a difference between the prediction image and the input image is coded. As a generation method for prediction images, inter-frame prediction (inter prediction) and intra-frame prediction (intra prediction) are known.
In intra prediction, on the basis of a locally decoded image within the same frame, prediction images in this frame are sequentially generated. More specifically, in intra prediction, normally, for each unit of prediction (for example, a block), one of prediction directions (prediction modes) included in a predetermined prediction direction group is selected, and also, the pixel value of a reference pixel in a locally decoded image is extrapolated to the selected prediction direction, thereby generating a prediction pixel value in a subject area to be predicted. On the other hand, in inter prediction, by applying motion compensation using motion vectors to a reference image within an entirely decoded reference frame (decoded image), a prediction image within a frame to be predicted is generated for each unit of prediction (for example, a block).
NPL 1 and NPL 2 disclose an adaptive offset filter disposed at a stage subsequent to a deblocking filter which reduces block distortion of a decoded image and at a stage prior to an adaptive loop filter (also referred to as an “adaptive filer”) which performs filtering processing using an adaptively determined filter coefficient. This adaptive offset filter adds an adaptively set offset to the pixel value of each pixel of an image output from the deblocking filter.
By providing such an adaptive offset filter, it is possible to suppress block distortion more effectively.